var mongoose = require('mongoose')
var dbUrl = "mongodb://localhost:27017/easy";
mongoose.connect(dbUrl);
require('./model/index')
mongoose.connection.on('connected', function () {
  console.log('数据库连接成功')
})

mongoose.connection.on('error', function () {
  console.log('数据库连接失败')
})

mongoose.connection.on('disconnected', function () {
  console.log('数据库断开连接')
  connected
})